package com.wuzhiming.istudy.mapper;

import com.wuzhiming.istudy.pojo.Comment;
import com.wuzhiming.istudy.pojo.Note;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName: NoteMapper
 * @Description: 用户笔记mapper
 * @Author:zhimingw
 * @Version 1.0
 * @since 2022/3/16 19:01
 */
@Mapper
public interface NoteMapper {
    /**
    * @Description: 添加笔记
    * @Param: [note]
    * @return: int
    * @Author: zhimingw
    * @Date: 2022/3/24
    */
    int addNote(Note note);

    /**
    * @Description: 获得某个用户的所有笔记 
    * @Param: [userId]
    * @return: java.util.List<com.wuzhiming.istudy.pojo.Note>
    * @Author: zhimingw
    * @Date: 2022/3/26
    */
    List<Note> getUserNote(Note note);

    /**
     * @Description: 获得某个用户的某个笔记
     * @Param: [userId]
     * @return: java.util.List<com.wuzhiming.istudy.pojo.Note>
     * @Author: zhimingw
     * @Date: 2022/3/26
     */
    Note getNoteDetail(Integer id);

    /**
    * @Description: 修改笔记状态
    * @Param: [comment]
    * @return: java.lang.Integer
    * @Author: zhimingw
    * @Date: 2022/3/31
    */
    Integer update(Note note);
}
